# -*-coding: Utf-8 -*-
# @File : spider_baidu .py
# author: Chimengmeng
# blog_url : https://www.cnblogs.com/dream-ze/
# Time：2023/10/10

import requests

from fake_useragent import UserAgent


class SpiderBaidu():
    def __init__(self):
        self.headers = {
            'User-Agent': UserAgent().random,
        }

    def spider_baidu_index(self):
        tag_url = 'https://www.baidu.com/'
        response = requests.get(tag_url, headers=self.headers)
        print(response.text)


s = SpiderBaidu()
s.spider_baidu_index()
